/*! \file exception.h
 *	\brief <write description for exception.h>
 *
 *	created:	2009/11/11
 *	created:	11:11:2009   12:56
 *	filename: 	c:\src\main\libs\core\exception.h
 *	file path:	c:\src\main\libs\core
 *	file base:	exception
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _CORE_EXCEPTION_H_
#define _CORE_EXCEPTION_H_

#pragma once

#include "String.h"

#define ttThrow(text) tt::core::Exception::Throw(text)

namespace tt{
namespace core{

class Exception
{
public:
	Exception();
	explicit Exception(const String&);
	virtual ~Exception();

	const String& msg() const;

public:
	static void Throw(const String&);
	static void SetDebugOnThrow(bool value);

	static bool s_debugOnThow;

private:
	String m_msg;
};

} //namespace core
} //namespace tt

#endif //_CORE_EXCEPTION_H_